<?php
$username = array(
	'name'	=> 'username',
	'id'	=> 'username',
	'class' => 'input ui-corner-all',
	'size'	=> 30,
	'value' => set_value('username'),
);

$password = array(
	'name'	=> 'password',
	'id'	=> 'password',
	'class' => 'input ui-corner-all',
	'size'	=> 30,
);
?>
<div class="grid_4 prefix_4" style="margin-top: 150px">
	<div class="ui-widget-header" style="height: 30px; font: bold 12px/30px Tahoma; padding-left: 10px; border: none;">ĐĂNG NHẬP</div>
	<div id="login_box" style="background: #fff; padding: 10px">
	<?php echo form_open('backend/login', 'id="login"')?>
		<?php if ($this->auth->get_auth_error()): ?>
		<div class="ui-widget">
			<div style="padding: 10px;" class="ui-state-error ui-corner-all"> 
				<p><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> 
				<strong>Lỗi:</strong> <?php echo $this->auth->get_auth_error(); ?></p>
			</div>
		</div>
		<?php endif?>
		<div class="b10">
			<div><?php echo form_label('Tài khoản', $username['id'], array('style' => 'width: 60px; font-weight: bold'));?></div>
			<div>
				<?php echo form_input($username)?>
				<?php if (form_error($username['name'])): ?>
				<div class="ui-widget">
					<div style="padding: 10px;" class="ui-state-error ui-corner-all"> 
						<p>
						<span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> 
						<b>Alert:</b> <?php echo form_error($username['name'], '<span>', '</span>'); ?></p>
					</div>
				</div>
				<?php endif?>
			</div>
			<div class="clear"></div>
		</div>
		<div class="b10">
			<div><?php echo form_label('Mật khẩu', $password['id'], array('style' => 'width: 60px; font-weight: bold'));?></div>
			<div>
				<?php echo form_password($password)?> 
				<?php if (form_error($password['name'])): ?>
				<div class="ui-widget">
					<div style="padding: 10px;" class="ui-state-error ui-corner-all"> 
						<p>
						<span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> 
						<b>Alert:</b> <?php echo form_error($password['name'], '<span>', '</span>'); ?></p>
					</div>
				</div>
				<?php endif?>
			</div>
			<div class="clear"></div>
		</div>
		<div style="text-align: right;">
			<button type="submit" name="login" id="login">ĐĂNG NHẬP</button>
		</div>
	<?php echo form_close()?>
	</div>
</div>